/**
 * Created by chensk740 on 2018/1/9.
 */
import { Injectable } from '@angular/core';
import { Response } from "@angular/http";

import { OrderService } from "@order/order.service";

import { HttpService } from "@core/http/http.service";
import { AuthService } from "@shared/service/auth/auth.service";
import * as API from "@api/index";

import {ToolsService} from "@shared/service/tools/tools.service";
@Injectable()
export class SharingService {

  constructor(
    private httpService: HttpService,
    private authService: AuthService,
    private orderService: OrderService,
    public toolsService: ToolsService
  ) { }

  getSharingNavList() {
    const url = API.GET_SHARING_NAV;
    return this.httpService.get(url).map((res: Response) => res.json());
  }
  getSharingContent(data) {
      const url = API.GET_SHARING_CONTENT + "?" + this.toolsService.params(data);
      return this.httpService.get(url).map((res: Response) => res.json());
  }
}
